package de.tum.in.eist.poll.shared.beans;

import java.util.Map;

import com.google.gwt.user.client.rpc.IsSerializable;



public class Lecture implements IsSerializable {
	/**
	 * The questions the poll for this lecture should ask for
	 */
	private Questions questions;
	
	/**
	 * The received feedback for the questions
	 */
	private Map<StudentLectureKey,Feedback> feedbacks;
	
	/**
	 * The lecturer this lecture belongs to
	 */
	private Lecturer lecturer;
	
	// TODO: for now this is just a pre-mature optimization
//	/**
//	 * Set of students, who participated in the poll for this lecture
//	 */
//	private Set<Student> students = new HashSet<Student>();
	
	/**
	 * This lecture's title
	 */
	private String title;
	
	/**
	 * Unique ID of this lecture
	 */
	private String lectureID;
	
	public Lecture() {}

	public Lecture(Lecturer lecturer, String lectureID, String title, Questions questions,
			Map<StudentLectureKey,Feedback> feedbacks) {
		this.lecturer  = lecturer;
		this.lectureID = lectureID;
		this.title     = title; 
		this.questions = questions;
		this.feedbacks = feedbacks;
	}

	/**
	 * 
	 * @return lecture ID
	 */
	public String getLectureID() {
		return lectureID;
	}
	
	/**
	 * 
	 * @return lecture title
	 */
	public String getLectureTitle() {
		return title;
	}
	
	/**
	 * 
	 * @return lecturer of this lecture
	 */
	public Lecturer getLecturer() {
		return lecturer;
	}

	public Questions getQuestions() {
		return questions;
	}

	public Map<StudentLectureKey,Feedback> getFeedbacks() {
		return feedbacks;
	}
	
//	/**
//	 * Add a student, who participated in the poll
//	 * 
//	 * @param student student to add
//	 */
//	public void addStudent(Student student) {
//		students.add(student);
//	}
//	
//	/**
//	 * 
//	 * @return {@link Set} of students who participated in the poll
//	 */
//	public Set<Student> getStudents() {
//		return students;
//	}
}
